import csv

with open('test2.csv') as f:
    # 创建一个reader对象，迭代时能够提取到每一行（包括表头）
    f_csv = csv.DictReader(f)
    for row in f_csv:
        print(type(row), row)
        # print(row.get("class_name"), row.get("name"), row.get("gender"), row.get("phone"), row.get("qq"), )
